package com.hptpd.questionnairesurvey.repository;

import com.hptpd.questionnairesurvey.domain.Questionnaire;
import com.hptpd.questionnairesurvey.domain.question.BaseQuestion;
import com.hptpd.questionnairesurvey.vo.QuestionVo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * \* Created with IntelliJ IDEA.
 * \* Date: 2019/12/18
 * \*
 * \* Description:
 * \
 *
 * @author walter_long
 */
@Repository("baseQuestionRep")
public interface BaseQuestionRep extends JpaRepository<BaseQuestion, String> {
    /**
     * 找出问卷的问题
     * @param questionnaire Questionnaire
     * @return List<BaseQuestion>
     */
    List<BaseQuestion> findByQuestionnaireOrderBySortAsc(Questionnaire questionnaire);
}
